package co.yixiang.yshop.module.product.enums;

import co.yixiang.yshop.framework.common.exception.ErrorCode;

/**
 * Product 错误码枚举类
 * <p>
 * product 系统，使用 1-008-000-000 段
 */
public interface ErrorCodeConstants {

    ErrorCode PARAM_ERROR = new ErrorCode(1008001000, "参数非法");
    // ========== 商品分类相关 1008001000 ============
    ErrorCode CATEGORY_NOT_EXISTS = new ErrorCode(1008001000, "商品分类不存在");
    ErrorCode CATEGORY_PARENT_NOT_EXISTS = new ErrorCode(1008001001, "父分类不存在");
    ErrorCode CATEGORY_PARENT_NOT_FIRST_LEVEL = new ErrorCode(1008001002, "分类最多只有二级哦");
    ErrorCode CATEGORY_EXISTS_CHILDREN = new ErrorCode(1008001003, "存在子分类，无法删除");
    ErrorCode CATEGORY_DISABLED = new ErrorCode(1008001004, "商品分类({})已禁用，无法使用");

    // ========== 商品品牌相关编号 1008002000 ==========
    ErrorCode BRAND_NOT_EXISTS = new ErrorCode(1008002000, "品牌不存在");
    ErrorCode BRAND_DISABLED = new ErrorCode(1008002001, "品牌不存在");
    ErrorCode BRAND_NAME_EXISTS = new ErrorCode(1008002002, "品牌名称已存在");

    // ========== 商品 1008003000 ==========
    ErrorCode STORE_PRODUCT_NOT_EXISTS = new ErrorCode(1008003000, "商品不存在");
    ErrorCode STORE_PRODUCT_ATTR_NOT_EXISTS = new ErrorCode(1008003001, "商品属性不存在");
    ErrorCode STORE_PRODUCT_ATTR_RESULT_NOT_EXISTS = new ErrorCode(1008003002, "商品属性详情不存在");
    ErrorCode STORE_PRODUCT_ATTR_VALUE_NOT_EXISTS = new ErrorCode(1008003003, "商品属性值不存在");
    ErrorCode STORE_PRODUCT_RULE_NOT_EXISTS = new ErrorCode(1008003004, "商品规则值(规格)不存在");
    ErrorCode STORE_PRODUCT_RULE_NEED = new ErrorCode(1008003005, "请至少添加一个规格值哦");
    ErrorCode STORE_PRODUCT_RULE_RE = new ErrorCode(1008003006, "规格值里包含'-',请重新添加");
    ErrorCode STORE_PRODUCT_STOCK_ERROR = new ErrorCode(1008003007, "库存不能低于0");
    ErrorCode STORE_PRODUCT_SLIDER_ERROR = new ErrorCode(1008003008, "请上传轮播图");
    ErrorCode STORE_PRODUCT_ATTR_NEED = new ErrorCode(1008003009, "请设置至少一个属性");

    ErrorCode STORE_PRODUCT_PRICE_ERROR = new ErrorCode(1008003010, "商品规格价格必须大于0");
    ErrorCode STORE_PRODUCT_DELETE_ERROR = new ErrorCode(1008003011, "商品存在订单或购物车数据");

    // ========== 运费模板 1008004000 ==========
    ErrorCode SHIPPING_TEMPLATES_NOT_EXISTS = new ErrorCode(1008004000, "运费模板不存在");
    ErrorCode SHIPPING_TEMPLATES_FREE_NOT_EXISTS = new ErrorCode(1008004001, "请添加包邮区域");
    ErrorCode SHIPPING_TEMPLATES_REGION_NOT_EXISTS = new ErrorCode(1008004002, "请添加区域");
    ErrorCode SHIPPING_TEMPLATES_FREE_NEED = new ErrorCode(1008004000, "请指定包邮地区");


    // ========== 评论 1008005000 ==========
    ErrorCode STORE_PRODUCT_REPLY_NOT_EXISTS = new ErrorCode(1008005000, "评论不存在");
    ErrorCode STORE_PRODUCT_RELATION_NOT_EXISTS = new ErrorCode(1008005001, "商品点赞和收藏不存在");
    ErrorCode STORE_PRODUCT_RELATION_EXISTS = new ErrorCode(1008005002, "已经收藏过");
    ErrorCode PRODUCT_STOCK_LESS = new ErrorCode(1008005003, "商品库存不足");

    ErrorCode STORE_PRODUCT_FOOT_NOT_EXISTS = new ErrorCode(1008005004, "足迹不存在");


    // ========== 优惠券 ==========
    ErrorCode PRODUCT_COUPON_RECEIVE_ERROR = new ErrorCode(1008006000, "领取优惠券到达上限！");

    ErrorCode PRODUCT_COUPON_NOT_EXISTS = new ErrorCode(1008006001, "优惠券不存在！");

    ErrorCode NOT_PRODUCT_COUPON_ERROR = new ErrorCode(1008006002, "无可领优惠券！");
    ErrorCode COUPON_CD_KEY_BAD_ERROR = new ErrorCode(1008006003, "该兑换码已存在！");
    ErrorCode COUPON_CD_KEY_NO_EXIST_ERROR = new ErrorCode(1008006003, "无效兑换码");
    ErrorCode COUPON_CD_KEY_USE_ERROR = new ErrorCode(1008006003, "该优惠码已被使用或无效");
    ErrorCode COUPON_STATUS_OUT_ERROR = new ErrorCode(1008006004, "该优惠券已过期，不可编辑");
    ErrorCode COUPON_NUMBER_ERROR = new ErrorCode(1008006005, "优惠券数量不符合规范！");
    // ========== 营销活动 ==========
    ErrorCode CAMPAIGN_REPEAT_ERROR = new ErrorCode(1008007000, "该项商品在此期间已有活动！");
    ErrorCode CAMPAIGN_NOT_PRODUCT_ERROR = new ErrorCode(1008007001, "活动未选择商品！");
    ErrorCode CAMPAIGN_OUT_OF_STOCK_ERROR = new ErrorCode(1008007002, "选择规格[{}]的商品库存不足！");
    ErrorCode CAMPAIGN_NOT_EXISTS = new ErrorCode(1008007003, " 活动不存在！");
    ErrorCode CAMPAIGN_CREATE_ERROR = new ErrorCode(1008007004, " 活动创建失败！");
    ErrorCode TEAMWORK_INFO_NOT_EXISTS = new ErrorCode(1008007005, " 拼团信息不存在！");
    ErrorCode CAMPAIGN_ADD_QUEUE_ERROR = new ErrorCode(1008007006, " 营销活动加入活动队列失败,失败信息:{}！");
    ErrorCode CAMPAIGN_REMOVE_QUEUE_ERROR = new ErrorCode(1008007007, " 营销活动移除活动队列失败,失败信息:{}！");
    ErrorCode CAMPAIGN_IN_PROGRESS_ERROR = new ErrorCode(1008007008, " 活动进行中！");
    ErrorCode CAMPAIGN_PASS_ORIGINAL_PRICE_ERROR = new ErrorCode(1008007009, "选择规格[{}]的商品超出原价！");
    ErrorCode TEAMWORK_REPEAT_JOIN_ERROR = new ErrorCode(1008007010, " 不能重复参加同一拼团！");

    ErrorCode CAMPAIGN_NUMBER_ERROR = new ErrorCode(1008007011, " 超出活动购买数量！");

    ErrorCode CAMPAIGN_PRICE_NOT_ZERO_ERROR = new ErrorCode(1008007012, " 选择规格[{}]的商品，活动价格不能为0！");
    ErrorCode CAMPAIGN_INTEGRAL_NOT_NULL_ERROR = new ErrorCode(1008007013, "请设置所有选中规格的兑换积分值");
    ErrorCode PRODUCT_TAG_GROUP_NULL_ERROR = new ErrorCode(1008007014, "该商品标签组不存在！");

    ErrorCode STORE_PRODUCT_ASSURE_NOT_EXISTS = new ErrorCode(1008007015, "商品保障服务不存在");

    ErrorCode STORE_PRODUCT_ASSURE_REF_NOT_EXISTS = new ErrorCode(1008007016, "商品保障服务关联不存在");
    ErrorCode STORE_PRODUCT_STOCK_WARNING_NOT_EXISTS = new ErrorCode(1008007017, "商品库存预警不存在");
    ErrorCode STORE_PRODUCT_STOCK_LOG_NOT_EXISTS = new ErrorCode(1008007018, "商品库存记录不存在");

}
